package yf.mall.service.app;

import yf.mall.entity.AppProductMaterialEntity;
import yf.mall.vo.AppProductMaterialVo;
import com.yf.service.BaseService;
import java.io.InputStream;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 商品素材关联表Service接口
 *
 * 
 * 
 * @date Tue Jul 18 14:30:26 CST 2023
 */
public interface AppProductMaterialService extends BaseService<AppProductMaterialEntity> {

    /************自动生成**************/
    List<AppProductMaterialVo> findVo(AppProductMaterialVo vo);

        AppProductMaterialVo getVo(Long id);

     int updateVo(AppProductMaterialVo vo);

       int saveVo(AppProductMaterialVo vo);

    void downLoad(HttpServletResponse response, List<AppProductMaterialVo> list);

    void upload(InputStream file);


    /***********BACK***********/





    /***********API***********/
    /**
     * 通过 商品id查询商品相关素材id
     * @param productId
     * @return
     */
    List<AppProductMaterialEntity> getByProduct(Long productId);

    /**
     * 通过产品id统计素材数
     * @param pids
     * @return
     */
    Map<Long, Integer> getPidCountMap( List<Long> pids);

    List<Long> findPidList();

}
